Skip to content

[stable33] fix: only use unencrypted_size if set to a value - #64964

Merged
susnux merged 2 commits into
stable33from
backport/64963/stable33
Oct 6, 2026
Merged

susnux merged 2 commits into
stable33from
backport/64963/stable33

Conversation

@backportbot

@backportbot backportbot Bot commented Sep 30, 2026

Copy link
Copy Markdown

Backport of PR #64963

@backportbot
backportbot Bot requested a review from a team as a code owner September 30, 2026 20:34
@backportbot
backportbot Bot requested review from Altahrim, CarlSchwan, leftybournes and salmart-dev and removed request for a team September 30, 2026 20:34
@backportbot backportbot Bot added bug 3. to review Waiting for reviews labels Sep 30, 2026
@backportbot backportbot Bot added this to the Nextcloud 33.0.10 milestone Sep 30, 2026
@susnux
susnux marked this pull request as draft September 30, 2026 21:25
@backportbot
backportbot Bot force-pushed the backport/64963/stable33 branch from 07c4418 to f889e09 Compare October 5, 2026 06:11
Resolves e2ee which cannot store unencrypted size displaying size `0 B`
because the Cache entry is initialized always to `unencrypted_size = 0`
in `cacheEntryFromData`.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@backportbot
backportbot Bot force-pushed the backport/64963/stable33 branch from f889e09 to ff82295 Compare October 5, 2026 10:54
@susnux
susnux marked this pull request as ready for review October 5, 2026 10:54
…d files

Preferring `unencrypted_size` only when it is greater than zero also drops
the plaintext size of a server side encrypted file whose content is empty,
where the cache holds `size` of one encryption header and `unencrypted_size`
of 0.

Only files carry the server side encryption mark, so an `encrypted` folder
got the flag from end-to-end encryption, which does not maintain
`unencrypted_size`. Decide by node type instead and route the three
diverging conditions through one predicate.

Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux
susnux force-pushed the backport/64963/stable33 branch from ff82295 to 789106e Compare October 6, 2026 10:36
@susnux
susnux merged commit 17756ad into stable33 Oct 6, 2026
177 checks passed
@susnux
susnux deleted the backport/64963/stable33 branch October 6, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants